<?php

 
namespace RedMVC\Router;
use RedMVC;

/**
 * ARouter class
 *  
 * @category    RedMVC
 * @package     Router
 * @author      Jan Fischer, bitWorking <info@bitworking.de>
 */
abstract class ARouter{
    public $controllerName;
    public $actionName;    
    public $params = array();
    public $requestString;
    protected $_translate;

    public abstract function readUrl();
    public abstract function buildUrl($controller, $action, $params = array());
    
    public function setTranslate(RedMVC\Translate $translate){
        $this->_translate = $translate;
    }
    
    public function getTranslate(){
        return $this->_translate;
    }
    
    protected function _($key){
        if(null === $this->_translate){
            return $key;
        }
        return $this->_translate->_($key);
    }
    
    protected function __($key){
        if(null === $this->_translate){
            return $key;
        }
        return $this->_translate->__($key);
    }
}